<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <meta name="description" content="">
    <meta name="author" content="">
    <title>物流资讯</title>
    <!-- Bootstrap core CSS -->
    <link href="../bootstrap-3.3.7-dist/css/bootstrap.min.css" rel="stylesheet">
    <script src="https://cdn.bootcss.com/html5shiv/3.7.3/html5shiv.min.js"></script>
    <script src="https://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
</head>

<body>
<nav th:replace="~{front/log/log_topbar::top}"></nav>
<div class="container" style="margin-top: 80px">
    <h2>物流热点</h2>
    <ul th:each="news:${pageDTO.result}">
        <li>
            <a style="text-decoration: none" target="_blank" th:text="${news.newsName}" th:href="@{'/logisticsPlatform/news_detail_front?newsId='+${news.newsId}}"></a>
            <span style="float: right" th:text="${news.updateTime}"></span>
            <hr>
        </li>
    </ul>

    <nav aria-label="Page navigation" id="pageNav">
        <ul class="pagination">
            <li><a th:href="@{'/logisticsPlatform/news_list_all?page=1'}">首页</a></li>
            <li th:unless="${pageDTO.page.hasPrevious()}" class="disabled">
                <a aria-label="Previous">
                    <span aria-hidden="true">&laquo;</span>
                </a>
            </li>
            <li th:if="${pageDTO.page.hasPrevious()}">
                <a aria-label="Previous" th:href="@{'/logisticsPlatform/news_list_all?page='+${pageDTO.page.getCurrent()-1}}">
                    <span aria-hidden="true">&laquo;</span>
                </a>
            </li>
            <li><span th:text="'第 '+${pageDTO.page.getCurrent()}+' 页/共 '+${pageDTO.page.getPages()}+' 页 '"></span></li>
            <li th:unless="${pageDTO.page.hasNext()}" class="disabled">
                <a aria-label="Next">
                    <span aria-hidden="true">&raquo;</span>
                </a>
            </li>
            <li th:if="${pageDTO.page.hasNext()}">
                <a href="#" aria-label="Next" th:href="@{'/logisticsPlatform/news_list_all?page='+${pageDTO.page.getCurrent()+1}}">
                    <span aria-hidden="true">&raquo;</span>
                </a>
            </li>
            <li><a th:href="@{'/logisticsPlatform/news_list_all?page='+${pageDTO.page.getPages()}}">末页</a></li>
        </ul>
    </nav>
</div>

<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="../jquery-3.3.1.js"></script>
<script src="../bootstrap-3.3.7-dist/js/bootstrap.min.js"></script>
<script>
    $(function () {
        $("#p1").removeClass("active");
        $("#p2").removeClass("active");
        $("#p3").removeClass("active");
        $("#p4").removeClass("active");
        $('#p6').addClass("active");
    })
</script>
</body>
</html>